//
//  DynamicShowViewController.m
//  EnjoyArkUIXIOS
//
//  Created by Dordly on 2024/3/6.
//

#import "DynamicShowViewController.h"
#import <Photos/Photos.h>
#import <libarkui_ios/StageApplication.h>
#import <libarkui_ios/BridgePlugin.h>
#import "BridgeClass.h"
#import "PublicAlertView.h"
//#import "ImgTools.h"

@interface DynamicShowViewController ()

@property (nonatomic, strong) StageApplication *application;
@property (nonatomic, strong) UIView *mainView;
@property (nonatomic, strong) StageViewController *stageVC;
@property (nonatomic, assign) CGFloat statusBarHeight;

@property (nonatomic, strong) UIImage *needEffectImage;
@property (nonatomic, strong) PublicAlertView *publicAlertView;

@property (nonatomic, strong) NSMutableArray *inputResultArray;

@end

@implementation DynamicShowViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self createUI];
}

- (void)createUI {
    self.mainView = [[UIView alloc] initWithFrame:self.view.bounds];
    [self.view addSubview:self.mainView];
    self.stageVC = [[StageViewController alloc] initWithInstanceName:[NSString stringWithFormat:@"%@:%@:%@",
                                                                      BUNDLE_NAME, self.moduleName, self.abilityName]];
    self.stageVC.view.frame = CGRectMake(0, 0, self.mainView.frame.size.width, self.mainView.frame.size.height);
    self.stageVC.view.backgroundColor = [UIColor whiteColor];
    [self.mainView addSubview:self.stageVC.view];
}

- (void)viewWillAppear:(BOOL)animated {
    self.navigationController.navigationBarHidden = YES;
    [super viewWillAppear:animated];
    AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
//    appDelegate.allowRotation = NO;
    [self setNewOrientation:NO];
}

@end
